﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<QuizAppMvc2.Materia>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Index</h2>
    <div id="questoes">
        <table>
            <tr>
                <th>
                    Nome
                </th>
            </tr>
            
            <% foreach (var item in Model)
               { %>
            <tr>
                <td>
                    <%: Html.ActionLink("Edit", "Edit", new { id=item.idMateria }) %>
                    |
                    <%: Html.ActionLink("Delete", "Delete", new { id=item.idMateria })%>
                </td>
                <td>
                    <%: item.Nome %>
                </td>
            </tr>
            <% } %>
        </table>
        <p>
            <%: Html.ActionLink("Create New", "Create") %>
        </p>
    </div>
</asp:Content>
